Skip to content

fix: isolate invalid Delaunay callback lanes - #411

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/delaunay-nan-callback
Jul 27, 2026
Merged

Jammy2211 merged 1 commit into
mainfrom
feature/delaunay-nan-callback

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Summary

  • isolate non-finite Delaunay mesh points inside each sequential JAX callback lane, avoiding a qhull exception that aborts the whole vmapped batch
  • reject padded sentinel simplices in the visibility walk so invalid meshes retain a live nearest-vertex mapping instead of laundering into finite pixel-0 weights
  • propagate invalid JAX meshes as NaN pixel weights while leaving the eager SciPy/NumPy exception path unchanged

Closes #410.

API Changes

None — internal changes only.

Test Plan

  • python -m pytest -x — 906 passed
  • imaging Delaunay production _vmap: poisoned lane resampled, finite sibling lanes bit-identical to the clean vmapped batch, raw fit log-likelihood NaN
  • interferometer Delaunay production _vmap: same assertions through the sparse inversion path
  • partial non-last vertex, last vertex, and all-NaN mesh poisoning under jit(vmap(value_and_grad)); finite-lane values and nonzero gradients bit-identical
  • unchanged scripts/imaging/jax_grad/delaunay.py FD certification passed (rtol=1e-2)
  • autolens_workspace_test curated smoke: 20/21 passed; imaging/subhalo_recovery.py exceeded its existing 300-second cap and was human-accepted as unrelated/non-causal

Validation checklist (--auto run)

  • Effective level: supervised (bug work-type cap); human approved the design and explicitly released the ship checkpoint
  • Plan: recorded on issue fix: isolate non-finite Delaunay callback lanes #410 before implementation
  • Gate: tests 906 passed · task-specific dense/sparse parity passed · scoped smoke 20/21 with unrelated timeout human-accepted · review CLEAN · Heart YELLOW exact reason set human-acknowledged
  • Human: diff matches the approved plan without scope creep
  • Human: merge, amend, or reject
Full API Changes (for automation & release notes)

No public symbols, signatures, defaults, or migrations changed.

Changed Behaviour

  • autoarray.inversion.mesh.interpolator.delaunay.scipy_delaunay_tri_only returns existing fixed-shape -1 sentinel connectivity for non-finite callback input rather than calling qhull.
  • The JAX Delaunay visibility walk treats padded connectivity as an outside/fallback result.
  • JAX Delaunay interpolation weights are NaN for a mesh containing any non-finite vertex; finite meshes are unchanged. The eager SciPy/NumPy production path retains its exception behavior.

Generated by the PyAutoLabs agent workflow.

@Jammy2211 Jammy2211 added the pending-release PR queued for the next release build label Jul 27, 2026
@Jammy2211
Jammy2211 merged commit 8c5e28e into main Jul 27, 2026
4 checks passed
@Jammy2211
Jammy2211 deleted the feature/delaunay-nan-callback branch August 25, 2026 18:15
@Jammy2211 Jammy2211 removed the pending-release PR queued for the next release build label Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: isolate non-finite Delaunay callback lanes

1 participant